import 'package:flutter/material.dart';

class MySliderView extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      appBar: AppBar(
        title: Text("混合视图MySliderView"),
      ),
      body: CustomScrollView(
        slivers: <Widget>[
          
          SliverGrid(
              gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
                crossAxisCount: 3,
                mainAxisSpacing: 3.0,
                crossAxisSpacing: 3.0
              ),
              delegate: SliverChildBuilderDelegate(
                (BuildContext context,int index){
                  return Container(
                    decoration: BoxDecoration(
                      color: Colors.grey
                    ),
                    child: Text("$index"),
                  );
                },
                childCount: 3
              ),
              
          ),
          SliverAppBar(
            title: Text("data11"),
            // expandedHeight: 200.0,
            pinned: true,
            // flexibleSpace: FlexibleSpaceBar(
            //   title: Text("ok"),
            //   centerTitle: true,
            // ),
            // floating: true,
          ),
          SliverList(
            delegate: SliverChildBuilderDelegate(
              (BuildContext context,int index){
                return Padding(
                  padding: EdgeInsets.all(4.0),
                  child: Container(
                    height: 50.0,
                  child: Text("$index"),
                  decoration: BoxDecoration(color: Colors.amber),
                  ),
                );
              },
              childCount: 14
            ),
            
          ),
          SliverAppBar(
            title: Text("data"),
            // expandedHeight: 200.0,
            pinned: true,
            // flexibleSpace: FlexibleSpaceBar(
            //   title: Text("ok"),
            //   centerTitle: true,
            // ),
            // floating: true,
          ),
          SliverList(
            delegate: SliverChildBuilderDelegate(
              (BuildContext context,int index){
                return Padding(
                  padding: EdgeInsets.all(4.0),
                  child: Container(
                    height: 50.0,
                  child: Text("$index"),
                  decoration: BoxDecoration(color: Colors.amber),
                  ),
                );
              },
              childCount: 14
            ),
            
          ),
        ],
      )

    );
  }
}